function Breadcrumbs2Init()
{
	// click on edit
	$("#editBreadcrumbsBtn").click(function()
	{
		$("#breadcrumbsContent").hide();
		$("#breadcrumbsEdit").show();
		return false;
	});
  
	// click on save
	$("#saveBreadcrumbsBtn").click(function()
	{
		var send = "";
		$("#breadcrumbsEdit").find("input").each(function(){
			if($(this).attr("value")){
				send += $(this).attr("name") + "=" + $(this).attr("value") + "&";
			}
		});
	
		// send ajax
		Cyfy.ajax("Breadcrumbs2", "save", "", send, "Blocks.reload('Breadcrumbs2', 'breadcrumbs', '', 'Breadcrumbs2Init();'); ");
	});



}

$(document).ready(function(){
	Breadcrumbs2Init();
});